package com.example.shysx11.web;

import com.example.shysx11.dao.IUserDao;
import com.example.shysx11.service.IUserService;
import com.example.shysx11.vos.ResultVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestWeb {
    @Resource
    private IUserDao dao;

    @Resource
    private IUserService userService;

    @RequestMapping("/a")
    public String a(){
        return "abcd";
    }

    @RequestMapping("/users")
    public ResultVo user(){


        return userService.getUsers();
    }

    @RequestMapping("one")
    public ResultVo one(){
       return  userService.getOne();
    }
}
